//
//  CTUrl.h
//  ConstellationTalk_0.1
//
//  Created by riley on 15/4/20.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import "CTConfig.h"

#ifndef ConstellationTalk_0_1_CTUrl_h
#define ConstellationTalk_0_1_CTUrl_h

static NSString * version = @"v2";

#ifdef CT_CONFIG_DEBUG_URL
static NSString * URL = @"http://apipoi.yuchats.com";
#else
static NSString * URL = @"http://picoapi.yuchats.com";
#endif

/* ==================== 登录注册模块 ==================== */

#define CT_URL_ACCOUNTS_VISITOR(_version)   [NSString stringWithFormat:@"%@/%@/accounts/visitor",URL,_version]
#define CT_URL_ACCOUNTS_WEIBO(_version)     [NSString stringWithFormat:@"%@/%@/accounts/weibo",URL,_version]
#define CT_URL_ACCOUNTS_QQ(_version)        [NSString stringWithFormat:@"%@/%@/accounts/qq",URL,_version]
#define CT_URL_ACCOUNTS_WECHAT(_version)    [NSString stringWithFormat:@"%@/%@/accounts/wechat",URL,_version]
#define CT_URL_ACCOUNTS_REGISTER(_version)  [NSString stringWithFormat:@"%@/%@/accounts/register",URL,_version]
#define CT_URL_ACCOUNTS_LOGIN(_version)     [NSString stringWithFormat:@"%@/%@/accounts/login",URL,_version]
#define CT_URL_ACCOUNTS_FORGET(_version)    [NSString stringWithFormat:@"%@/%@/accounts/forget",URL,_version]
#define CT_URL_ACCOUNTS_VALIDATE(_version)  [NSString stringWithFormat:@"%@/%@/accounts/validate",URL,_version]


/* ==================== 用户信息模块 ==================== */

#define CT_URL_USERS_MODIFY(_version)       [NSString stringWithFormat:@"%@/%@/users/modify",URL,_version]
#define CT_URL_USERS_INFO(_version)       [NSString stringWithFormat:@"%@/%@/users/show",URL,_version]

#define CT_URL_USERS_FENCE_LIST(_version)       [NSString stringWithFormat:@"%@/%@/friendships/friends",URL,_version]
#define CT_URL_USERS_FOLLOW_LIST(_version)       [NSString stringWithFormat:@"%@/%@/friendships/follows",URL,_version]

#define CT_URL_USERS_PUBLISH_INFO_LIST(_version)  [NSString stringWithFormat:@"%@/%@/release/timelineuser",URL,_version]
#define CT_URL_USERS_PUBLISH_INFO_DETAILS(_version)  [NSString stringWithFormat:@"%@/%@/release/info",URL,_version]



/* ==================== 首页模块 ==================== */

#define CT_URL_HOMEPAGE_SUBJECTS(_version)  [NSString stringWithFormat:@"%@/%@/subjects/info",URL,_version]
#define CT_URL_HOMEPAGE_HOTSPOTS(_version)  [NSString stringWithFormat:@"%@/%@/subjects/hotspots",URL,_version]
#define CT_URL_HOMEPAGE_HOTSPOTS_DETAIL(_version)  [NSString stringWithFormat:@"%@/%@/release/timelinehotspot",URL,_version]


/* ==================== 发现模块 ==================== */

#define CT_URL_FOLLOWLIST(_version)         [NSString stringWithFormat:@"%@/%@/release/timelinefollow",URL,_version]
#define CT_URL_FOLLOWLIST_RECOMMEND(_version) [NSString stringWithFormat:@"%@/%@/release/likeranking",URL,_version]
#define CT_URL_USER_SUGGESTIONS(_version)   [NSString stringWithFormat:@"%@/%@/suggestions/user",URL,_version]




/* ==================== 通知模块 ==================== */

#define CT_URL_MESSAGE_NOTIFICATION(_version)    [NSString stringWithFormat:@"%@/%@/notice/list",URL,_version]
#define CT_URL_MESSAGE_NOTIFICATION_DELETE(_version)    [NSString stringWithFormat:@"%@/%@/notice/del",URL,_version]
#define CT_URL_MESSAGE_NOTIFICATION_SWITCH(_version)     [NSString stringWithFormat:@"%@/%@/tool/notification",URL,_version]


/* ==================== 发布模块 ==================== */
#define CT_URL_PUBLISH_EMOJI_LIST(_version)     [NSString stringWithFormat:@"%@/%@/subjects/infolists",URL,_version]
#define CT_URL_PUBLISH_UPLOAD(_version)   [NSString stringWithFormat:@"%@/%@/release/upload",URL,_version]
#define CT_URL_PUBLISH_BUBBLE(_version)   [NSString stringWithFormat:@"%@/%@/release/bubbles",URL,_version]




/* ==================== 版本更新模块 ==================== */

#define CT_URL_APP_VERSION_UPDATE(_version) [NSString stringWithFormat:@"%@/%@/tool/version",URL,_version]



/* ==================== 其它模块 ==================== */

#define CT_URL_OTHER_FOLLOW_PERSON(_version)  [NSString stringWithFormat:@"%@/%@/friendships/create",URL,_version]
#define CT_URL_OTHER_CANCEL_FOLLOW_PERSON(_version) [NSString stringWithFormat:@"%@/%@/friendships/destroy",URL,_version]
#define CT_URL_OTHER_LIKE_CONTENT(_version)    [NSString stringWithFormat:@"%@/%@/motion/like",URL,_version]
#define CT_URL_OTHER_CANCEL_LIKE_CONTENT(_version)  [NSString stringWithFormat:@"%@/%@/motion/unlike",URL,_version]
#define CT_URL_OTHER_ADD_COMMENT(_version)  [NSString stringWithFormat:@"%@/%@/motion/commentadd",URL,_version]
#define CT_URL_OTHER_DELETE_COMMENT(_version)  [NSString stringWithFormat:@"%@/%@/motion/commentdel",URL,_version]

#define CT_URL_OTHER_COMMENT_LIST(_version) [NSString stringWithFormat:@"%@/%@/motion/commentlist",URL,_version]

#define CT_URL_OTHER_REPORT(_version)  [NSString stringWithFormat:@"%@/%@/tool/report",URL,_version]

#define CT_URL_OTHER_DELETE_PUBLISH(_version)  [NSString stringWithFormat:@"%@/%@/release/destroy",URL,_version]




/* ==================== 开关 ==================== */

#define CT_URL_SWITCH  [NSString stringWithFormat:@"%@/p11/tool/iosonline",URL]

#endif
